import java.util.Scanner;
import java.util.Arrays;
public class Main {
    public static void main(String[] args) {
        int[] arr = new int[0];
        int n = 1;
        String str = "hello world";
        System.out.println(str.length());
        System.out.println(arr.length);
        Scanner scanner = new Scanner(System.in);
        while(n != 0) {
            n = scanner.nextInt();
            arr = Arrays.copyOf(arr, arr.length+1);
            arr[arr.length-1] = n;
        }
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));
    }
}